#ifndef __I2C0_H__
#define __I2C0_H__

#include "ADuCM4050.h"
#include "GPIO.h"
#include "DELAY.h"

#define I2C0_SDA P0_O(5)
#define I2C0_SCL P0_O(4)
#define I2C0_READ_SDA P0_I(5)

void I2C0_AN_SDA_OUT(void);
void I2C0_AN_SDA_IN(void);
void I2C0_AN_Start(void);
void I2C0_AN_Stop(void);
uint8_t I2C0_AN_Wait_Ack(void);
void I2C0_AN_Ack(void);
void I2C0_AN_No_Ack(void);
void I2C0_AN_Send_Byte(uint8_t txd);
uint8_t I2C0_AN_Read_Byte(void);
uint8_t I2C0_AN_Slave_Ack(uint8_t slave_add);

//void TMP75_WriteOneByte(uint8_t DeviceAdd,uint8_t PointAddr,uint8_t DataToWrite);
//void TMP75_WriteOneWord(uint8_t DeviceAdd,uint8_t PointAddr,uint16_t DataToWrit);
//uint8_t TMP75_ReadOneByte(uint8_t DeviceAdd, uint8_t PointAddr);
//uint16_t TMP75_ReadOneWord(uint8_t DeviceAdd, uint8_t PointAddr);

#endif

